package com.jwt.vpower.view.ui
{
	import TenCMS.components.mediaarea.mediaarea;
	import TenCMS.components.textbox.textbox;
	
	import com.jwt.vpower.model.TenCMS_Components;
	import com.ui.Styles;
	
	import flash.geom.Rectangle;
		public class SummaryBox extends DisplayClip
		{
			private var _summarycopytf : textbox;
			private var _summaryheadingtf : textbox
			private var _summaryimage : mediaarea;
			public function SummaryBox()
			{
				super();
				_summaryheadingtf=TenCMS_Components.TextBox(new Rectangle(0,0,190,28),"heading",Styles.SUMMARY_TITLE);
				_summarycopytf=TenCMS_Components.TextBox(new Rectangle(0,0,204,80),"copy",Styles.SUMMARY_COPY);
				_summarycopytf.selectable=	_summaryheadingtf.selectable=false;
				//_summaryimage=TenCMS_Components.MediaArea(new Rectangle(0,0,204,46),"image");
				addChild(_summaryheadingtf);
				addChild(_summarycopytf);
				_summaryheadingtf.x=-4
				_summarycopytf.x=-2;
				_summarycopytf.y=40
			//	_summaryimage.y=32
				
			//	addChild(_summaryimage);
				
				
			}
			
			override public function set contentXML($xml:XML):void{
				super.contentXML=$xml;
				_summaryheadingtf.contentxml=$xml;
				
				_summarycopytf.contentxml=$xml.summary[0];
				
				//_summaryimage.contentxml=$xml.summary[0];
				//trace( "  " + _summaryimage.contentxml)
				
			}
			override public function setEditable($isEditable:Boolean):void{
				_summarycopytf.selectable=$isEditable;
			}
		}
}